package com.sjn.common.response;


import io.swagger.v3.oas.annotations.media.Schema;

/**
 * @Author:SWZ
 * @Date: 2021/3/10 13:56
 * Version 1.0
 */
@Schema(description = "Version 1.0")
public class Meta {

    @Schema(description = "返回代码")
    private Integer code;
    @Schema(description = "返回信息")
    private String message;


    public Meta(ResponseCode code) {
        this.code = code.getCode();
        this.message = code.getMessage();
    }

    public Meta(Integer code, String msg) {
        this.code = code;
        this.message = msg;
    }

    public Meta() {
    }

    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String toString() {
        return "Meta{" +
                " message='" + message + '\'' +
                ", code=" + code +
                '}';
    }
}
